/*
 * @Author       : Darcy
 * @Date         : 2021-04-23 21:45:27
 * @LastEditors  : Darcy
 * @LastEditTime : 2021-04-23 22:30:04
 * @FilePath     : \HelloWorld\Cpp\TXExersice\06\Automobile.cpp
 * @Description  : <(￣︶￣)↗[GO!]
 * https://github.com/Darcy-Zhang
 */

#include "Automobile.h"

#include <utility>

Automobile::Automobile(std::string license) {
    licensePlate = std::move(license);
    fee = 0;
}

std::string Automobile::showLicensePlate() { return licensePlate; }

double Automobile::showFee() const { return fee; }

void Automobile::enter(Park &park) { park.enter(this); }

void Automobile::leave(Park &park) { park.leave(this); }

Truck::Truck(const std::string &license, double load) : Automobile(license) {
    licensePlate = license;
    loadCapacity = load;
    fee = 3;
}

Car::Car(const std::string &license, std::string Brand) : Automobile(license) {
    licensePlate = license;
    brand = std::move(Brand);
    fee = 1;
}

Bus::Bus(const std::string &license, int carry) : Automobile(license) {
    licensePlate = license;
    passengerCarryingCapacity = carry;
    fee = 2;
}
